package com.example.juyuanapp.ui;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;

import com.example.juyuanapp.R;

public class RegistActivity extends AppCompatActivity implements View.OnClickListener {
    Button btnRegistConfirm,btnRegistBack;
    EditText etRegistName,etRegistPassword,etRegistRePassword;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_regist);
        initView();
    }

    private void initView() {
        btnRegistConfirm = findViewById(R.id.btn_regist_confirm);
        btnRegistConfirm.setOnClickListener(this);
        btnRegistBack = findViewById(R.id.btn_regist_back);
        btnRegistBack.setOnClickListener(this);

        etRegistName = findViewById(R.id.et_regist_name);
        etRegistPassword = findViewById(R.id.et_regist_password);
        etRegistRePassword = findViewById(R.id.et_regist_repassword);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.btn_regist_confirm:
                Intent intent1 = new Intent(this,FoodListActivity.class);
                startActivity(intent1);
                break;
            case R.id.btn_regist_back:
                Intent intent2 = new Intent(this,LoginActivity.class);
                startActivity(intent2);
                break;
        }
    }
}